package org.lixf.maven;

import java.sql.Driver;

public class RuntimeScopeTest {
    public static void main(String[] args) throws Exception {
        // <scope>runtime</scope> 运行时依赖
        // scope为runtime时不能直接new
        // Driver driver = new com.mysql.cj.jdbc.Driver();

        Class<?> clazz = Class.forName("com.mysql.cj.jdbc.Driver");
        Driver driver = (Driver) clazz.newInstance();
        System.out.println(driver);

    }
}
